package com.hedl.practice.diyJava.reflex.study_01.tmp02;

import com.hedl.practice.diyJava.reflex.study_01.tmp02.enums.Foods;

//抽象类 实现小学生日常行为 这里本身没有实现 交给它的子类实现
public abstract class Student implements Behaviour{

    private String name = "";
    private String title = "";
    private int score = 0;
    private Foods foods = Foods.FRI;

    public Student(){       //构造方法，没有传姓名生成随机姓名
        Integer n = (int) ((Math.random() * 9) + 1) * 100000;
        setName(n.toString());
    }

    public Student(String name){
        setName(name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public Foods getFoods() {
        return foods;
    }

    public void setFoods(Foods foods) {
        this.foods = foods;
    }
}
